function [x,y]=igpdfcheck(para1,para2);

close all;

a = para1;
b = para2;

nu=b;
s=b*a^2;

mu=sqrt(s/2)*gamma((nu-1)/2)/gamma(nu/2);
sigma=sqrt(s/(nu-2)-mu^2);

mu+5*sigma;

x = linspace(0.000001,ans,100);
y = exp(log(2) - gammaln(b/2) + (b/2)*log(b*a^2/2) - ( (b+1)/2 )*log(x.^2) - b*a^2./(2*x.^2));

fmt = '%0.5g';

plot(x,y);
title(['Inverse Gamma with (' num2str(a,fmt) ', ' num2str(b,fmt) ')']);
xlabel(['\mu = ' num2str(mu,fmt)  '    \sigma = ' num2str(sigma,fmt) ]);
